<ot-view>

    <div class="ot-home-filter input-group col-md-4 form-inline">
        <input class="form-control"
               type="text"
               ng-model="filterToken"
               placeholder="Filter on promotion level names"/>
        <span class="input-group-addon"><span class="fa fa-filter"></span></span>
    </div>

    <div ng-if="predefinedPromotionLevels.resources" class="ot-entity-sortable-list"
         ui-sortable="predefinedPromotionLevelSortOptions" ng-model="predefinedPromotionLevels.resources">
        <div ng-repeat="promotionLevel in predefinedPromotionLevels.resources | filter: {name: filterToken}" class="ot-entity-sortable-list-item row">
            <div class="col-md-1">
                    <span class="ot-entity-sortable-list-handle"
                          ng-if="predefinedPromotionLevels._reorderPromotionLevels"
                          title="Move this to reorder the promotion levels">&nbsp;</span>
                    <span class="ot-entity-sortable-list-image">
                        <ot-entity-image entity="promotionLevel"></ot-entity-image>
                    </span>
            </div>
            <div class="col-md-3">
                {{promotionLevel.name}}
            </div>
            <div class="col-md-6 ot-description">
                {{promotionLevel.description}}
            </div>
            <div class="col-md-2">
                <span
                        class="fa fa-image ot-command"
                        ng-click="editPromotionLevelImage(promotionLevel)"
                        title="Edits the image for the {{promotionLevel.name}} promotion level"></span>
                <span
                        class="fa fa-pencil ot-command"
                        ng-click="editPromotionLevel(promotionLevel)"
                        title="Edits the name or description for the {{promotionLevel.name}} promotion level"></span>
                <span
                        class="fa fa-trash ot-command"
                        ng-click="deletePromotionLevel(promotionLevel)"
                        title="Deletes the {{promotionLevel.name}} promotion level"></span>
            </div>
        </div>
    </div>

    <div class="row" ng-hide="predefinedPromotionLevels.resources">
        <div class="col-md-12 alert alert-warning">
            No predefined promotion level has been created yet.
        </div>
    </div>

</ot-view>